#将npy文件内容写入到csv文件
import numpy as np
import os
import sys
import time
import csv
np.set_printoptions(threshold = np.inf)
np.set_printoptions(suppress = True)
stdout_fileno = sys.stdout

origin_dir = "./npy_source/"
new_dir = "./dst_CSV/"
for npy_list in os.listdir(origin_dir):
    # 读取.npy文件

    arry = np.load(origin_dir + '/' +npy_list)
    print(arry)
    sys.stdout = open(new_dir + npy_list +".csv","w")